Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9185395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:15:57+00:00 2026-06-17T19:15:57+00:00

In the Scrap Your Boilerplate package , in Data.Generics.Aliases , there are functions to

  • 0

In the Scrap Your Boilerplate package, in Data.Generics.Aliases, there are functions to allow type extension for unary, and binary type constructors. In particular, there are definitions for ext1 and ext2.

Now, ext1 and ext2 are defined in terms of dataCast1, and dataCast2, which are part of the Data type class, and are usually defined by the DeriveDataTypeable machinery. But, there’s no dataCast3, so I don’t see an easy way to define ext3.

Is it possible to define ext3, and if so, how?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:15:59+00:00Added an answer on June 17, 2026 at 7:15 pm

    I’m pretty sure this isn’t sufficient. But it feels darn close.

    ext3 :: (Data a, Typeable3 t)
         => c a
         -> (forall d1 d2 d3. c (t d1 d2 d3))
         -> c a
    ext3 def ext = maybe def (id) (gcast3' ext)
    
    gcast3' :: (Typeable3 t, Data a) => c (t f g h) -> Maybe (c a)
    gcast3' x = r
     where
      r = if typeOf3 (getArg x) == typeOf3' (getArg (fromJust r))
           then Just $ unsafeCoerce x
           else Nothing
      getArg :: c x -> x
      getArg = undefined
      typeOf3' z = mkTyConApp (typeRepTyCon (typeOf z)) []
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the 2003 Scrap Your Boilerplate paper by Laemmel and SPJ there is a
I'm writing a XML (de)serializer using Text.XML.Light and Scrap your Boilerplate (at http://github.com/finnsson/Text.XML.Generic )
I've used the Scrap Your Boilerplate and Uniplate libraries in the Haskell programming language,
I tried to follow the program of the paper Scrap your boilerpolate Revolutions .
The problem: I want to scrap some data from certain webpage (I have administrative
I'm using Web-Harvest to scrap a website and generate xml file with data. I'm
Hi I am using HtmlAgilityPack to scrap some data from web using c# .
I am using scrapy to scrap a site I had written a spider and
I'm looking for a PHP library that allows me to scrap webpages and takes
I have a program where I want to scrap some useful study material for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.