Hello everyone,
I'm still trying to resolve my problem. I try to restate it in a simpler
way.
Is it possible to write extract and update functions for L ?
import Data.Nat
data family X (n::Nat) :: *
data L (n::Nat) where
Q :: L (Succ n) - X n - L n
E :: L n
extract :: L Zero - X n
Hi Paolino,
There are some functions similar to that in HList (Data.HList.HArray).
Check the repo http://code.haskell.org/HList for a version that uses
more type families / gadts.
Maybe there is a way to take advantage of the fact that you've
labelled the elements of the list, but extract isn't
I would like to come back to the original question:
How can ordNub be added to base?
I guess we agree that Data.List is the right module for a function of
type Ord a = [a] - [a], but this introduces
* a cyclic dependency between Data.List and Data.Set
* a base dependency on containers.
What is
On Oct 12, 2013, at 2:47 PM, Niklas Hambüchen m...@nh2.me wrote:
I would like to come back to the original question:
How can ordNub be added to base?
I guess we agree that Data.List is the right module for a function of
type Ord a = [a] - [a], but this introduces
* a cyclic
On 12/10/13 20:43, Anthony Cowley wrote:
I think nub's behavior is rather set-related, so I don't really understand
the objection to putting it in Data.Set.
In sets, the order does not matter, while for nub it does.
nub:: Eq a = [a] - [a]
ordNub :: Ord a = [a] - [a]
both do not
* Anthony Cowley acow...@seas.upenn.edu [2013-10-12 15:43:57-0400]
On Oct 12, 2013, at 2:47 PM, Niklas Hambüchen m...@nh2.me wrote:
I would like to come back to the original question:
How can ordNub be added to base?
I guess we agree that Data.List is the right module for a
Anyone here from the Nashville, TN area? t would be nice to meet
regularly with others to discuss and work with Haskell. Also, this
group is now available:
www.meetup.com/The-Haskell-Study-Group/
If you want to participate remotely, that works too, I'm just looking
for others to meet with
Yes, it's possible, but it's rather painful.
Here is my working attempt, written to be compatible with GHC 7.6.3. Better
ones may be possible, but I'm doubtful.
{-# LANGUAGE TemplateHaskell, RankNTypes, TypeFamilies, TypeOperators,
DataKinds, ScopedTypeVariables, GADTs, PolyKinds