code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module Seats ( Seats
-- * Accessor
, getNum
-- * Our errors
, Error(..)
-- * Smart constructor
, make
) where
import Data.Validation
-- | Wrapper around 'Int' that ensures always positive.
newtype Seats = Seats { getNum :: Int ... | pittsburgh-haskell/data-validation-demo-haskell | src/Seats.hs | bsd-3-clause | 756 | 0 | 8 | 245 | 162 | 90 | 72 | 15 | 1 |
{-# LANGUAGE TypeFamilies, FlexibleInstances, PostfixOperators, GADTs, StandaloneDeriving #-}
{-# OPTIONS_HADDOCK hide #-}
module ForSyDe.Atom.MoC.DE.React.Core where
import ForSyDe.Atom.MoC
import ForSyDe.Atom.MoC.TimeStamp
import ForSyDe.Atom.Utility.Tuple
import Prelude hiding (until)
import Control.Concurrent
imp... | forsyde/forsyde-atom | src/ForSyDe/Atom/MoC/DE/React/Core.hs | bsd-3-clause | 8,077 | 0 | 15 | 1,869 | 2,908 | 1,558 | 1,350 | -1 | -1 |
{-# OPTIONS_GHC -Wall #-}
module Main ( main ) where
import Data.Binary ( encode )
import JacobiRootsRaw300
main :: IO ()
main = do
writeFile "../src/JacobiRootsBinary.hs" blah
blah :: String
blah = unlines
[ "{-# OPTIONS_GHC -Wall #-}"
, "{-# Language OverloadedStrings #-}"
, ""
, "m... | ghorn/jacobi-roots | gen/Convert.hs | bsd-3-clause | 789 | 0 | 10 | 188 | 121 | 69 | 52 | 21 | 1 |
module Main where
import Paths_tutTest
import System.Environment
import KeyPos
import Graphics.Vty
import Control.Monad.Tools
import Data.Time
import Numeric
main :: IO ()
main = do
[ fn ] <- getArgs
tutRule <- getDataFileName "tutcode-rule.txt" >>= readFile >>= return . read
keyPos <- getDataF... | YoshikuniJujo/tutTest | src/tutTyping.hs | bsd-3-clause | 4,464 | 6 | 30 | 1,850 | 1,686 | 878 | 808 | 91 | 2 |
module GreetIfCool where
greetIfcool :: String -> IO ()
greetIfcool coolness =
case cool of
True -> putStrLn "Cool..."
False -> putStrLn "Meh..."
where cool = coolness == "very cool"
| chengzh2008/hpffp | src/ch07-FunctionPattern/greetIfCool.hs | bsd-3-clause | 196 | 0 | 8 | 43 | 59 | 30 | 29 | 7 | 2 |
module Data.Graph.Simple.Query.Paths (
) where
| stefan-hoeck/labeled-graph | Data/Graph/Simple/Query/Paths.hs | bsd-3-clause | 48 | 0 | 3 | 6 | 12 | 9 | 3 | 1 | 0 |
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 709
{-# LANGUAGE AutoDeriveTypeable #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.Trans.List
-- Copyright : (c) Andy Gill 2001,
-- (c) Oregon Graduate Institute of Science an... | DavidAlphaFox/ghc | libraries/transformers/Control/Monad/Trans/List.hs | bsd-3-clause | 3,664 | 0 | 14 | 845 | 1,240 | 654 | 586 | 67 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveGeneric #-}
module Zodiac.Raw.Error(
RequestError(..)
, renderRequestError
) where
import Control.DeepSeq.Generics (genericRnf)
import Data.ByteString (ByteString)
import qualified Data.Text as T
impo... | ambiata/zodiac | zodiac-raw/src/Zodiac/Raw/Error.hs | bsd-3-clause | 1,091 | 0 | 9 | 216 | 266 | 147 | 119 | 39 | 1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE MultiParamTypeClasses #-}
-- | This module implements a ... | emwap/feldspar-compiler-shim | src/Feldspar/Compiler/FromImperative.hs | bsd-3-clause | 12,099 | 0 | 17 | 2,740 | 3,633 | 1,888 | 1,745 | 278 | 20 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
--
-- (c) The University of Glasgow 2006
--
-- The purpose of this module is to transform an HsExpr into a CoreExpr which
-- when evaluated, returns a (Meta.Q Meta.Exp) computation analogous to the
-- input HsExpr. We do... | mcschroeder/ghc | compiler/deSugar/DsMeta.hs | bsd-3-clause | 92,826 | 59 | 24 | 28,075 | 29,220 | 14,609 | 14,611 | 1,564 | 18 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
module Main ( main ) where
import Chrome.Command
import Chrome.DB
import Chrome.Server
import Jetpack
import Opts
-- 2: Get the list of pages
data ChromiumPageInfo = ChromiumPageInfo
{ chromiumDe... | rvion/ride | chrotomate/app/Main.hs | bsd-3-clause | 3,519 | 0 | 17 | 801 | 1,016 | 489 | 527 | 80 | 3 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, NoImplicitPrelude, ScopedTypeVariables, MagicHash #-}
{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.List
-- Copyright : (c) The Uni... | sdiehl/ghc | libraries/base/GHC/List.hs | bsd-3-clause | 42,559 | 0 | 14 | 11,334 | 6,035 | 3,464 | 2,571 | 445 | 4 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE UnicodeSyntax #-}
{-|
[@ISO639-1@] oc
[@ISO639-2@] oci
[@ISO639-3@] oci
[@Native name@] occitan, lenga d'òc
[@English name@] Occitan
-}
module Text.Numeral.Language.... | telser/numerals | src-test/Text/Numeral/Language/OCI/TestData.hs | bsd-3-clause | 6,803 | 0 | 8 | 1,985 | 1,723 | 1,151 | 572 | 193 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Concurrent.MVar
import Control.Monad.IO.Class (liftIO)
import Prelude hiding (concat)
import Data.Conduit
import Data.Conduit.Network
import Data.Conduit.Text as DCT
import Data.Text (Text, concat, pack)
import qualified Data.Text.IO as TI
import YOL... | lesguillemets/rainfall-vim-hs | app/Main.hs | bsd-3-clause | 1,304 | 0 | 14 | 439 | 399 | 209 | 190 | 46 | 2 |
{-# OPTIONS -Wall #-}
-- The grm grammar generator
-- Copyright 2011-2012, Brett Letner
module Grm.Lex
( Token(..)
, Point(..)
, lexFilePath
, lexContents
, ppToken
, ppTokenList
, happyError
, notWSToken
, unTWhitespace
, unTSLComment
, unTMLComment
, unTString
, unTChar
, unTNumber
, u... | stevezhee/grm | Grm/Lex.hs | bsd-3-clause | 12,623 | 0 | 20 | 3,334 | 5,014 | 2,531 | 2,483 | 424 | 10 |
{-# LANGUAGE CPP, GeneralizedNewtypeDeriving #-}
--------------------------------------------------------------------------------
-- | The LLVM Type System.
--
module Llvm.Types where
#include "HsVersions.h"
import GhcPrelude
import Data.Char
import Data.Int
import Numeric
import DynFlags
import FastString
import... | sdiehl/ghc | compiler/llvmGen/Llvm/Types.hs | bsd-3-clause | 35,651 | 0 | 17 | 8,406 | 5,995 | 3,195 | 2,800 | 489 | 5 |
{-# LANGUAGE ExistentialQuantification #-}
module Control.Concurrent.Chan.ReadOnly
( ReadOnlyChan
, toReadOnlyChan
) where
import Control.Concurrent.Chan (Chan)
import Control.Concurrent.Chan.Class
data ReadOnlyChan b = forall a . ReadOnlyChan (Chan a) (a -> b)
instance Functor ReadOnlyChan where
fmap f (Re... | osa1/privileged-concurrency | Control/Concurrent/Chan/ReadOnly.hs | bsd-3-clause | 734 | 0 | 10 | 140 | 212 | 112 | 100 | 19 | 1 |
{-# LANGUAGE DeriveGeneric #-}
module Ssb.Message where
import GHC.Generics
import Data.Aeson
import Data.Int (Int64)
type MessageLink = String
type FeedLink = String
type HashType = String
type Signature = String
data Message a = Message
{ previous :: MessageLink
, author :: FeedLink
, sequence :: Int64
, ... | bkil-syslogng/haskell-scuttlebutt | src/Ssb/Message.hs | bsd-3-clause | 483 | 0 | 8 | 97 | 138 | 84 | 54 | 19 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
module VYPe15.Types.Tokens
where
import Data.Char (Char)
import Data.Int (Int)
import Data.String (String)
import Text.Show (Show)
data Token
= TokenNumConst Int
| TokenCharConst Char
| TokenStringConst String
| TokenID String
| TokenAssign
| TokenPlus
| TokenMinu... | Tr1p0d/VYPe15 | src/VYPe15/Types/Tokens.hs | bsd-3-clause | 714 | 0 | 6 | 185 | 162 | 104 | 58 | 41 | 0 |
-- (c) The University of Glasgow, 2006
{-# LANGUAGE CPP, ScopedTypeVariables #-}
-- | Package manipulation
module Packages (
module PackageConfig,
-- * Reading the package config, and processing cmdline args
PackageState(preloadPackages),
initPackages,
readPackageConfigs,
... | gcampax/ghc | compiler/main/Packages.hs | bsd-3-clause | 60,033 | 239 | 22 | 16,176 | 10,450 | 5,672 | 4,778 | 837 | 11 |
module Network.Kontiki.RaftSpec where
import Data.Kontiki.MemLog
import Network.Kontiki.Raft
import Test.Hspec
import Test.QuickCheck
raftSpec :: Spec
raftSpec = describe "Raft Protocol" $ do
it "steps down and grant vote on Request Vote if term is greater" $ do
handleRe... | abailly/kontiki | test/Network/Kontiki/RaftSpec.hs | bsd-3-clause | 330 | 0 | 10 | 86 | 59 | 33 | 26 | 9 | 1 |
module Buildsome.Color
( Scheme(..), scheme
) where
import Lib.ColorText (ColorText(..), withAttr)
import System.Console.ANSI (Color(..), ColorIntensity(..))
import qualified Lib.Printer as Printer
import qualified System.Console.ANSI as Console
fgColor :: ColorIntensity -> Color -> Console.SGR
fgColor = Console.... | nadavshemer/buildsome | src/Buildsome/Color.hs | gpl-2.0 | 1,456 | 0 | 11 | 286 | 423 | 245 | 178 | 33 | 1 |
module TypeArityTycon3 where
main :: A
main = 0
data A a = A a | roberth/uu-helium | test/staticerrors/TypeArityTycon3.hs | gpl-3.0 | 65 | 0 | 6 | 17 | 24 | 15 | 9 | 4 | 1 |
-- |
-- Module : Data.Hourglass.Internal
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- System lowlevel functions
--
{-# LANGUAGE CPP #-}
module Data.Hourglass.Internal
( dateTimeFromUnixEpochP
, dateTimeFromUnixE... | ppelleti/hs-hourglass | Data/Hourglass/Internal.hs | bsd-3-clause | 508 | 0 | 4 | 93 | 44 | 34 | 10 | 8 | 0 |
{-# OPTIONS_GHC -cpp #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Version
-- Copyright : Isaac Jones, Simon Marlow 2003-2004
--
-- Maintainer : Isaac Jones <ijones@syntaxpolice.org>
-- Stability : alpha
-- Portability : portable
--
-- Ve... | alekar/hugs | packages/Cabal/Distribution/Version.hs | bsd-3-clause | 13,158 | 22 | 14 | 2,709 | 2,100 | 1,157 | 943 | 86 | 1 |
{-# LANGUAGE RecursiveDo, ScopedTypeVariables #-}
module Reflex.Dom.Widget.Lazy where
import Reflex
import Reflex.Dom.Class
import Reflex.Dom.Widget.Basic
import Control.Monad.IO.Class
import Data.Fixed
import Data.Monoid
import qualified Data.Map as Map
import Data.Map (Map)
import GHCJS.DOM.Element
-- |A list vie... | hamishmack/reflex-dom | src/Reflex/Dom/Widget/Lazy.hs | bsd-3-clause | 3,814 | 0 | 23 | 952 | 1,040 | 535 | 505 | 60 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Properties where
import Test.Framework.Providers.QuickCheck2
import Test.Framework.TH
import Test.QuickCheck
prop_list_reverse_reverse :: [Int] -> Bool
prop_list_reverse_reverse list = list == reverse (reverse list)
prop_list_length :: [Int] -> Int -> Bool
prop_list_length lis... | TomRegan/HaskellStarter | test/Properties.hs | mit | 392 | 0 | 9 | 53 | 109 | 60 | 49 | 10 | 1 |
data List a = Nil | Cons a (List a) | hmemcpy/milewski-ctfp-pdf | src/content/1.7/code/haskell/snippet15.hs | gpl-3.0 | 35 | 0 | 8 | 9 | 22 | 12 | 10 | 1 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-autoscaling/gen/Network/AWS/AutoScaling/DisableMetricsCollection.hs | mpl-2.0 | 3,971 | 0 | 10 | 790 | 417 | 261 | 156 | 52 | 1 |
{-# LANGUAGE CPP #-}
-- |
-- Module:
-- Reflex.Spider
-- Description:
-- This module exports all of the user-facing functionality of the 'Spider' 'Reflex' engine
module Reflex.Spider
( Spider
, SpiderTimeline
, Global
, SpiderHost
, runSpiderHost
, runSpiderHostForTimeline
... | reflex-frp/reflex | src/Reflex/Spider.hs | bsd-3-clause | 465 | 0 | 4 | 137 | 48 | 34 | 14 | 12 | 0 |
module List (
elemIndex, elemIndices,
find, findIndex, findIndices,
nub, nubBy, delete, deleteBy, (\\), deleteFirstsBy,
union, unionBy, intersect, intersectBy,
intersperse, transpose, partition, group, groupBy,
inits, tails, isPrefixOf, isSuffixOf,
mapAccumL, mapAccumR,
sort, sortBy, ins... | alekar/hugs | packages/haskell98/List.hs | bsd-3-clause | 1,131 | 0 | 5 | 228 | 337 | 227 | 110 | 24 | 0 |
-- Copyright 2016 TensorFlow authors.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agree... | tensorflow/haskell | tensorflow-records/src/TensorFlow/Records.hs | apache-2.0 | 4,523 | 0 | 16 | 859 | 835 | 457 | 378 | 82 | 3 |
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
module T16110_Fail2 where
-- Ensure that kind variables don't leak into error messages if they're not
-- pertitent to the issue at hand
class C (a :: j) where
type T (a :: j) (b :: k) (c :: k)
type T a b b = Int
| sdiehl/ghc | testsuite/tests/indexed-types/should_fail/T16110_Fail2.hs | bsd-3-clause | 274 | 0 | 7 | 60 | 60 | 39 | 21 | 6 | 0 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE CPP #-}
------------------------------------------------------------... | danidiaz/lens | tests/templates.hs | bsd-3-clause | 8,885 | 0 | 12 | 1,838 | 2,545 | 1,395 | 1,150 | 203 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{- # OPTIONS_GHC -fno-defer-type-errors ... | ezyang/ghc | testsuite/tests/typecheck/should_fail/T13446.hs | bsd-3-clause | 1,226 | 0 | 11 | 242 | 386 | 214 | 172 | 36 | 0 |
module Phone where
import Data.Char (isAlphaNum, toLower)
import Data.List (elemIndex, find, group, sort)
import Data.Maybe (fromMaybe)
convo :: [String]
convo = [ "Wanna play 20 questions"
, "Ya"
, "U 1st haha"
, "Lol ok. Have u ever tasted alcohol"
, "... | ashnikel/haskellbook | ch11/ch11.18_phone_ex.hs | mit | 2,190 | 0 | 15 | 704 | 698 | 402 | 296 | 55 | 2 |
module Euler001 (euler1) where
euler1 :: Int
euler1 = sum [x | x <- [1..999] :: [Int], x `mod` 5 == 0 || x `mod` 3 == 0]
| TrustNoOne/Euler | haskell/src/Euler001.hs | mit | 122 | 0 | 12 | 29 | 72 | 42 | 30 | 3 | 1 |
-- | Re-export all symbols and instances of the process-extras
-- package. Adds the Chunk type with a ProcessOutput instance, and a
-- collectOutput function to turn a list of chunks into any instance
-- of ProcessOutput, such as (ExitCode, String, String). This means
-- you can have readCreateProcess output a list o... | seereason/process-extras | src/System/Process/ListLike.hs | mit | 5,598 | 0 | 11 | 1,186 | 1,240 | 712 | 528 | 104 | 1 |
{- contains the GUI data types
-
-}
module Language.Astview.Gui.Types where
import Data.Label
import Data.IORef
import Graphics.UI.Gtk hiding (Language,get,set)
import Graphics.UI.Gtk.SourceView (SourceBuffer)
import Language.Astview.Language(Language,SrcSpan,Path,position)
-- |a type class for default values, comp... | jokusi/Astview | src/gui/Language/Astview/Gui/Types.hs | mit | 4,410 | 0 | 9 | 831 | 968 | 543 | 425 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
import Conduit (Sink, await, liftIO, (=$), ($$), ($$+), ($$+-))
import Control.Concurrent.Async (race_)
import Data.Binary (decode)
import Data.Binary.Get (runGet, getWord16be, getWord32le)
import Data.ByteString (ByteString)
import q... | fishky/shadowsocks-haskell | server.hs | mit | 3,047 | 0 | 24 | 1,017 | 883 | 466 | 417 | 59 | 4 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-missing-fields #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-------------------... | danplubell/hbase-haskell | src/Database/HBase/Internal/Thrift/Hbase_Types.hs | mit | 33,352 | 192 | 38 | 7,138 | 9,551 | 4,732 | 4,819 | 710 | 20 |
-- Copyright (c) 2013-2014 Vincent Legout <vincent@legout.info>
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, co... | vlegout/draw | Tasks.hs | mit | 2,854 | 2 | 8 | 842 | 480 | 294 | 186 | 58 | 1 |
module AST where
import Text.Show.Pretty
{-- AST Primitives --}
type TypeName = String
type MethodName = String
data DataType = IntegerType
| ObjectType TypeName
| CopyType TypeName
| ObjectArrayType TypeName
| IntegerArrayType
| ArrayType
... | cservenka/ROOPLPPC | src/AST.hs | mit | 4,300 | 0 | 11 | 1,299 | 1,408 | 775 | 633 | 106 | 1 |
module FunctionSyntax where
sumTill :: Int -> Int
sumTill 1 = 1
sumTill n = n + sumTill (n - 1)
sumTill' :: Int -> Int
sumTill' n
| n == 1 = 1
| otherwise = n + sumTill' (n - 1)
sumTill'' :: Int -> Int
sumTill'' x = case x of
1 | x > 0 -> 1
_ -> x + sumTill'' (x - 1)
rot13Char :: Char -> Char
rot13Char c
| isU... | abhin4v/haskell-classes | 2016-02-23/FunctionSyntax.hs | cc0-1.0 | 556 | 0 | 11 | 162 | 279 | 139 | 140 | 24 | 2 |
module System.Console.ListPromptSpec
where
import System.Console.ListPrompt.Internal
import System.Console.ListPrompt.Types
import System.Console.Terminal.Size (Window (..))
import Test.Hspec
spec :: Spec
spec = -- do
describe "getDimensions" $ do
it "works... | yamadapc/list-prompt | test/System/Console/ListPromptSpec.hs | gpl-2.0 | 542 | 0 | 18 | 155 | 134 | 76 | 58 | 12 | 1 |
import Data.Tuple (swap)
potencia :: Float -> Int -> Float
potencia b = (!!) $ iterate (*b) 1
divisor :: Int -> Int -> (Int,Int)
divisor a b = (d,a-d)
where d = last $ takeWhile ((<=a).(*b)) [0..]
divisores :: Int -> [Int]
divisores x = 1:x:[n | n <- [2..x `div` 2] , x `mod` n == 0]
esPrimo :: Int -> Bool
esPri... | ABorgna/algebra1 | clases/4.hs | gpl-2.0 | 353 | 1 | 11 | 81 | 210 | 119 | 91 | 10 | 1 |
-- file: ch07/callingpure.hs
name2reply :: String -> String
name2reply name =
"Pleased to meet you, " ++ name ++ ".\n" ++
"Your name contains " ++ charcount ++ " characters."
where charcount = show (length name)
main :: IO ()
main = do
putStrLn "Greetings once again. What is your name?"
inpS... | dormouse/blog | source/haskell/haskell_learn/callingpure.hs | gpl-2.0 | 395 | 0 | 10 | 103 | 101 | 48 | 53 | 11 | 1 |
module Cashlog.Data.Types where
data Article = Article {
articleId :: Int
, articleName :: String
, articlePrice :: Double
, articleCategoryId :: Int
} deriving (Show)
type ArticleSkeleton = (String, Double, Int)
data Category = Category {
categoryId :: Int
, categoryParent :: Int
... | pads-fhs/Cashlog | src/Cashlog/Data/Types.hs | gpl-2.0 | 1,034 | 0 | 8 | 251 | 264 | 168 | 96 | 34 | 0 |
import Yi.Buffer.Basic
import Yi.Buffer.HighLevel
import Yi.Buffer.Indent
import Yi.Buffer.Misc
import Yi.Buffer.Normal
import Yi.Buffer.Region
import Yi.Buffer.Undo
import Yi.Buffer.Implementation
fun a = 2 | codemac/yi-editor | tests/data/haskell/14.hs | gpl-2.0 | 208 | 0 | 5 | 20 | 57 | 36 | 21 | 9 | 1 |
-- -*- mode: haskell -*-
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
module RedBlackTree.Param where
import Autolib.Reader
import Autolib.ToDoc
import Data.Typeable
import Autolib.Set
data Param = Param { anzahl :: Int, stellen :: Int }
deriving ( Typeable )
example :: Param
example = Param { anzahl = 1... | Erdwolf/autotool-bonn | src/Baum/RotSchwarzBaumProjekt/Param.hs | gpl-2.0 | 383 | 0 | 9 | 63 | 103 | 62 | 41 | 11 | 1 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
module Convert.Type where
import Autolib.Reader
import Autolib.ToDoc
import Data.Typeable
import qualified Convert.Input
import Autolib.Exp.Inter
import Autolib.Exp
import Autolib.NFA hiding ( alphabet )
import Autolib.Set
data Convert =
Convert { name :: ... | Erdwolf/autotool-bonn | src/Convert/Type.hs | gpl-2.0 | 877 | 13 | 10 | 183 | 240 | 141 | 99 | 23 | 2 |
-- elefante.hs
-- Dibujo de un elefante.
-- José A. Alonso Jiménez <jalonso@us.es>
-- Sevilla, 20 de Mayo de 2013
-- ---------------------------------------------------------------------
-- ---------------------------------------------------------------------
-- Ejercicio. Dibujar un elefante como en la figura elefant... | jaalonso/I1M-Cod-Temas | src/Tema_25/elefante.hs | gpl-2.0 | 1,022 | 0 | 13 | 207 | 257 | 142 | 115 | 13 | 1 |
module Constants where
import Data.Int
import Data.Word
import Graphics.UI.SDL as SDL
width :: Double
width = 1024
height :: Double
height = 600
gameWidth :: Double
gameWidth = width
gameHeight :: Double
gameHeight = height
-- Energy transmission between objects in collisions
velTrans :: Double
velTrans = 1.00
-... | keera-studios/pang-a-lambda | Experiments/splitballs/Constants.hs | gpl-3.0 | 657 | 0 | 6 | 118 | 163 | 100 | 63 | 29 | 1 |
#!/usr/bin/env runhaskell -iscripts
{-# LANGUAGE UnicodeSyntax #-}
module PosToMd where
import Prelude.Unicode
import ToMarkdownList
import System.IO (hPutStrLn, stderr)
import Text.Megaparsec (parse)
main ∷ IO ()
main = do
text ← getContents
let list = haskellListToMdList <$> parse (haskellList List "posAnd... | 39aldo39/klfc | scripts/PosToMd.hs | gpl-3.0 | 468 | 0 | 13 | 79 | 129 | 67 | 62 | 12 | 1 |
-- Run doctests for HGrib.
module Main ( main ) where
import Test.DocTest ( doctest )
main :: IO ()
main = doctest ["-idist/build", "-isrc", "-lgrib_api", "src"]
| mjakob/hgrib | test/DocTest.hs | gpl-3.0 | 165 | 0 | 6 | 30 | 50 | 30 | 20 | 4 | 1 |
module Main (main) where
import Test.Framework
import Test.HUnit
import Test.Framework.Providers.HUnit
import Test.Framework.Providers.QuickCheck2
import HuffmanTree
import Bit
main :: IO ()
main = defaultMain tests
tests = [
--Test Bit .&.
testCase "Bit .&. test, One && One = One"
$ testBitAnd One O... | JacobLeach/huffman_encoding | test/TestBits.hs | gpl-3.0 | 4,869 | 0 | 9 | 1,379 | 1,150 | 576 | 574 | 114 | 1 |
import DB
import qualified Database.HDBC.Sqlite3 as Sqlite3
main = do
conn <- Sqlite3.connectSqlite3 "data.db"
print =<< getAllUserBio conn | swordfeng/tg-biobot | src/Dump.hs | gpl-3.0 | 149 | 0 | 9 | 27 | 40 | 21 | 19 | 5 | 1 |
{-- |
This overrides the @pandocCompiler@ function from Hakyll with one which
enables MathML, enables highlighted code-blocks, disables HTML5 figures
and works around CRLFs in files, which confused Pandoc.
-}
module Site.Pandoc (pandocCompiler) where
import Data.Set (insert, delete)
import Hakyll hiding (pandocComp... | budgefeeney/amixtureofmusings | Site/Pandoc.hs | gpl-3.0 | 1,552 | 0 | 9 | 303 | 252 | 140 | 112 | 25 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE DeriveDataTypeable, BangPatterns #-}
-- |
-- #name_types#
-- GHC uses several kinds of name internally:
--
-- * 'OccName.OccName' represents names as strings with just a little more information:
-- the \"... | shayan-najd/HsParser | OccName.hs | gpl-3.0 | 9,873 | 7 | 9 | 2,867 | 1,036 | 582 | 454 | 106 | 1 |
import Development.Hake
import Development.Hake.FunSetRaw
import Variables
main = hake [
dflt [ target ]
,
rule "" ".c" $ \t (s:_) -> [ [ "cc", "-o", t, s ] ]
]
| YoshikuniJujo/hake_haskell | web_page/samples/use_hakefileIs/hakeMain.hs | gpl-3.0 | 168 | 0 | 10 | 38 | 73 | 42 | 31 | 6 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-pagespeed/gen/Network/Google/Resource/PagespeedOnline/PagespeedAPI/RunPagespeed.hs | mpl-2.0 | 5,424 | 0 | 17 | 1,303 | 715 | 419 | 296 | 105 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-classroom/gen/Network/Google/Resource/Classroom/UserProFiles/Guardians/Delete.hs | mpl-2.0 | 7,951 | 0 | 20 | 1,754 | 955 | 563 | 392 | 136 | 1 |
{-
Copyright 2017 Thomas Tuegel
This file is part of recategorize.
recategorize is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
re... | ttuegel/recategorize | src/Category.hs | lgpl-3.0 | 2,115 | 0 | 11 | 476 | 662 | 369 | 293 | -1 | -1 |
data Enc a = Single a | Multiple Int a deriving (Show)
encodeDirect :: Eq a => [a] -> [Enc a]
encodeDirect [] = []
encodeDirect (x:xs) = encodeDirect' (Single x) xs
where
encodeDirect' x [] = [x]
encodeDirect' (Single x) (y:ys)
| x == y = encodeDirect' (Multiple 2 x) ys
encode... | alephnil/h99 | 13.hs | apache-2.0 | 476 | 0 | 12 | 140 | 241 | 122 | 119 | 10 | 4 |
{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
-- Run with `stack setup && stack test` or `testOEIS`
--
--
| peterokagey/haskellOEIS | test/Spec.hs | apache-2.0 | 104 | 0 | 2 | 18 | 6 | 5 | 1 | 1 | 0 |
module AlecSequences.A269423Spec (main, spec) where
import Test.Hspec
import AlecSequences.A269423 (a269423)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A269423" $
it "correctly computes the first 20 elements" $
take 20 (map a269423 [1..]) `shouldBe` expectedValue where
expectedValue = [... | peterokagey/haskellOEIS | test/AlecSequences/A269423Spec.hs | apache-2.0 | 369 | 0 | 10 | 59 | 160 | 95 | 65 | 10 | 1 |
-- http://www.codewars.com/kata/5500d54c2ebe0a8e8a0003fd
module Codewars.Kata.GCD where
import Prelude hiding (gcd, lcm)
gcd :: Integral n => n -> n -> n
gcd = curry (fst . head . dropWhile ((/=0) . snd) . iterate (\(a, b) -> (b, a `mod` b)))
| Bodigrim/katas | src/haskell/B-Greatest-common-divisor.hs | bsd-2-clause | 244 | 0 | 12 | 41 | 106 | 62 | 44 | 4 | 1 |
{-# OPTIONS -fglasgow-exts -#include "../include/gui/qtc_hs_QAbstractItemDelegate_h.h" #-}
-----------------------------------------------------------------------------
{-| Module : QAbstractItemDelegate_h.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-0... | uduki/hsQt | Qtc/Gui/QAbstractItemDelegate_h.hs | bsd-2-clause | 52,824 | 0 | 19 | 11,273 | 16,967 | 8,046 | 8,921 | -1 | -1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QNetworkProxy.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:31
Warning : this file is machine generated - do... | uduki/hsQt | Qtc/Network/QNetworkProxy.hs | bsd-2-clause | 8,624 | 0 | 16 | 1,342 | 2,534 | 1,326 | 1,208 | -1 | -1 |
module OpenRTB.Types.BidRequest.Imp.Pmp.Deal where
import Prelude hiding (id)
import Data.Aeson
import Data.Text
import Data.Word
-- | This object constitutes a specific deal that was struck *a priori* between
-- a buyer and a seller. Its presence with the `Pmp` collection indicates
-- that this impression is av... | ankhers/openRTB-hs | src/OpenRTB/Types/BidRequest/Imp/Pmp/Deal.hs | bsd-3-clause | 1,545 | 0 | 10 | 361 | 122 | 83 | 39 | 13 | 0 |
module Codegen where
import qualified LLVM.General.AST as A
import qualified LLVM.General.AST.Type as T
import qualified LLVM.General.AST.Float as F
import qualified LLVM.General.AST.Constant as C
import qualified LLVM.General.AST.Instruction as I
import qualified LLVM.General.AST.CallingConvention as CC
import qualif... | ademinn/JavaWithClasses | src/Codegen.hs | bsd-3-clause | 8,084 | 0 | 13 | 1,677 | 3,065 | 1,580 | 1,485 | -1 | -1 |
module EC2Tests.PlacementGroupTests
( runPlacementGroupTests
)
where
import Data.Text (Text)
import Test.Hspec
import qualified Control.Exception.Lifted as E
import Cloud.AWS.EC2
import Cloud.AWS.EC2.Types (PlacementGroupStrategy(..))
import Util
import EC2Tests.Util
region :: Text
region = "us-east-1"
... | worksap-ate/aws-sdk | test/EC2Tests/PlacementGroupTests.hs | bsd-3-clause | 1,236 | 0 | 18 | 230 | 233 | 125 | 108 | 29 | 1 |
module Blog.JSON
()
where
-- Extern
import Text.JSON
import Database.CouchDB.JSON ( jsonField
, jsonObject
, jsonString
)
import Text.JSON.Generic
import Text.Pandoc
-- Intern
import Blog.Definition
import Blog.Auxiliary (dro... | frosch03/frogblog | Blog/JSON.hs | bsd-3-clause | 5,741 | 1 | 18 | 2,058 | 668 | 376 | 292 | 37 | 2 |
module BS where
import qualified Data.Text.IO as TIO
import qualified Data.Text.Encoding as TE
import qualified Data.ByteString.Lazy as BL
import qualified Codec.Compression.GZip as GZip
input :: BL.ByteString
input = "123"
compressed :: BL.ByteString
compressed = GZip.compress input
main :: IO ()
main = do
TIO.p... | chengzh2008/hpffp | src/ch28-BasicLibraries/bytestring.hs | bsd-3-clause | 420 | 0 | 11 | 61 | 128 | 75 | 53 | 13 | 1 |
{-# LANGUAGE CPP, DeriveDataTypeable, StandaloneDeriving #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Version
-- Copyright : Isaac Jones, Simon Marlow 2003-2004
-- Duncan Coutts 2008
--
-- Maintainer : cabal-devel@haskell.org
-... | fpco/cabal | Cabal/Distribution/Version.hs | bsd-3-clause | 29,942 | 0 | 17 | 8,044 | 5,591 | 2,999 | 2,592 | 392 | 12 |
module Name (
Name(name_string), name,
freshName, freshNames
) where
import Utilities
import Data.Function
import Data.List
import Data.Ord
data Name = Name {
name_string :: String,
name_id :: Maybe Id
}
instance Show Name where
show = show . pPrint
instance Eq Name where
(==) = (==) `... | batterseapower/core-haskell | Name.hs | bsd-3-clause | 1,027 | 0 | 13 | 252 | 393 | 211 | 182 | 30 | 1 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-@ LIQUID "--diff" @-}
module Language.Haskell.Liquid.Liquid (
-- * Executable command
liquid
-- * Single query
, runLiquid
-... | ssaavedra/liquidhaskell | src/Language/Haskell/Liquid/Liquid.hs | bsd-3-clause | 7,985 | 0 | 16 | 2,124 | 2,099 | 1,088 | 1,011 | 147 | 2 |
module Main where
import qualified Streaming.Prelude as Str
import qualified System.IO.Streams as IOS
import Conduit.Simple as S
import Control.Exception
import Criterion.Main
import Data.Conduit as C
import Data.Conduit.Combinators as C
import Fusion as F hi... | PierreR/streaming | benchmarks/StreamingTest.hs | bsd-3-clause | 3,131 | 0 | 15 | 1,046 | 1,209 | 632 | 577 | 87 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-} -- For deriving Num for Literal and Offset
-- |
-- Module : HBPF.Internal
-- Description : Internal types for BPF assembly representation and pretty printing
-- Copyright : (c) Andrew Duffy and Matt Denton, 2016
-- License : BSD3
... | hBPF/hBPF | HBPF/Internal.hs | bsd-3-clause | 9,755 | 0 | 14 | 2,459 | 2,402 | 1,300 | 1,102 | 175 | 5 |
{-# LANGUAGE ExistentialQuantification, ScopedTypeVariables, TypeFamilies, TypeOperators, RankNTypes, FlexibleContexts, UndecidableInstances #-}
module Data.Vector.Generic.Static where
import Control.Applicative
import Prelude hiding (map, take, drop, concatMap)
import qualified Data.Vector.Generic as G
import qualif... | copumpkin/vector-static | Data/Vector/Generic/Static.hs | bsd-3-clause | 15,116 | 0 | 14 | 3,804 | 9,046 | 4,600 | 4,446 | 273 | 1 |
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module EFA.Application.Type where
import qualified EFA.Flow.SequenceState.Index as Idx
import qualified EFA.Flow.Sequence.Quantity as SeqQty
import quali... | energyflowanalysis/efa-2.1 | src/EFA/Application/Type.hs | bsd-3-clause | 4,354 | 0 | 15 | 782 | 1,104 | 653 | 451 | 66 | 0 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.NV.FillRectangle
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
--... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/NV/FillRectangle.hs | bsd-3-clause | 649 | 0 | 4 | 78 | 37 | 31 | 6 | 3 | 0 |
-- | Pattern Translation
--
--
-- This is a naive, but straightforward compilation of pattern match to sum and product types.
--
-- We translate
-- case x of {p -> e' | ps}
-- into
-- let
-- kf = \() -> case x of ps
-- in
-- m
-- where x match p then Succes e' else FailCont (kf x) ---> m
--
-- We trans... | lambdageek/insomnia | src/Insomnia/ToF/Pattern.hs | bsd-3-clause | 11,061 | 0 | 20 | 3,099 | 2,939 | 1,513 | 1,426 | 219 | 5 |
instance (MonadState s m) => MonadState s (NondetT m) where
get = NondetT $ do
s <- get
return [s]
put s = NondetT $ do
put s
return [()]
| davdar/quals | writeup-old/sections/04MonadicAAM/04Optimizations/00Widen/07NondetTMonadState.hs | bsd-3-clause | 158 | 0 | 11 | 50 | 82 | 39 | 43 | -1 | -1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.INTEL
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
--
-- A conve... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/INTEL.hs | bsd-3-clause | 881 | 0 | 5 | 92 | 81 | 66 | 15 | 7 | 0 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeApplications #-}
module Main
( main
) where
import Universum
import qualified Codec.Archive.Tar as Tar
import Crypto.Hash (Digest, SHA512, hashlazy)
import qualified Data.ByteString.Lazy as BSL
import ... | input-output-hk/pos-haskell-prototype | tools/src/genupdate/Main.hs | mit | 6,060 | 0 | 24 | 1,765 | 1,475 | 757 | 718 | 123 | 2 |
{-- snippet parallelMap --}
import Control.Parallel (par)
parallelMap :: (a -> b) -> [a] -> [b]
parallelMap f (x:xs) = let r = f x
in r `par` r : parallelMap f xs
parallelMap _ _ = []
{-- /snippet parallelMap --}
{-- snippet forceList --}
forceList :: [a] -> ()
forceList (x:xs) = x `pseq` ... | binesiyu/ifl | examples/ch24/ParMap.hs | mit | 759 | 0 | 9 | 178 | 271 | 148 | 123 | 14 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
-- | Slotting utilities.
module Pos.Core.Slotting.Util
(
-- * Helpers using 'MonadSlots[Data]'
getCurrentSlotFlat
, slotFromTimestamp
-- * W... | input-output-hk/pos-haskell-prototype | core/src/Pos/Core/Slotting/Util.hs | mit | 6,825 | 0 | 22 | 1,847 | 901 | 509 | 392 | 108 | 5 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
module Snap.Snaplet.Internal.Initializer
( addPostInitHook
, addPostInitHookBase
, toSnapletHook
, bracketInit
, modifyCfg
, nestSnaplet
, embedSnaplet
, makeSnaplet
, nameSnaplet
, onUnload
,... | sopvop/snap | src/Snap/Snaplet/Internal/Initializer.hs | bsd-3-clause | 29,194 | 0 | 19 | 7,776 | 5,567 | 2,891 | 2,676 | 386 | 2 |
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
-- A monad for manipulating ordered lists. Follows the implementation
-- given in the appendix of O'Neill's and Burton's JFP paper, but
-- doesn't impose any fixed limit of the number of elements.
-- References:
-- Dietz and Sleator: "Two algorithms for maint... | Blaisorblade/Haskell-Adaptive | Control/Monad/Adaptive/OrderedList.hs | bsd-3-clause | 6,741 | 0 | 23 | 2,106 | 3,306 | 1,690 | 1,616 | 170 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-| DRBD proc file parser
This module holds the definition of the parser that extracts status
information from the DRBD proc file.
-}
{-
Copyright (C) 2012 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitt... | leshchevds/ganeti | src/Ganeti/Storage/Drbd/Parser.hs | bsd-2-clause | 13,713 | 0 | 26 | 3,211 | 2,899 | 1,421 | 1,478 | 268 | 4 |
{-# OPTIONS_GHC -Wall #-}
module Nitpick.TopLevelTypes (topLevelTypes) where
import Prelude hiding (maybe)
import qualified Data.Foldable as F
import qualified Data.Map as Map
import qualified AST.Expression.Valid as Valid
import qualified AST.Declaration as Decl
import qualified AST.Module.Name as ModuleName
import ... | laszlopandy/elm-compiler | src/Nitpick/TopLevelTypes.hs | bsd-3-clause | 2,761 | 0 | 18 | 672 | 799 | 432 | 367 | 77 | 5 |
-- -----------------------------------------------------------------------------
--
-- (c) The University of Glasgow 1994-2004
--
-- -----------------------------------------------------------------------------
module SPARC.Regs (
-- registers
showReg,
virtualRegSqueeze,
realRegSqueeze,... | TomMD/ghc | compiler/nativeGen/SPARC/Regs.hs | bsd-3-clause | 7,616 | 0 | 15 | 2,721 | 1,930 | 1,031 | 899 | 151 | 10 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
module Yes... | Daniel-Diaz/yesod | yesod-core/Yesod/Core/Types.hs | mit | 22,121 | 0 | 16 | 5,980 | 5,743 | 3,183 | 2,560 | -1 | -1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="ja-JP">
<title>Linux WebDrivers</title>
<maps>
<homeID>top</homeID>
<mapref location="m... | thc202/zap-extensions | addOns/webdrivers/webdriverlinux/src/main/javahelp/org/zaproxy/zap/extension/webdriverlinux/resources/help_ja_JP/helpset_ja_JP.hs | apache-2.0 | 961 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -1 |
{-# LANGUAGE MagicHash #-}
module StrictBinds where
import GHC.Exts
foo = let x = 3# +# y
y = x in
True
| ezyang/ghc | testsuite/tests/typecheck/should_fail/StrictBinds.hs | bsd-3-clause | 123 | 0 | 9 | 41 | 35 | 20 | 15 | 6 | 1 |
{-# LANGUAGE PatternSynonyms, ExistentialQuantification #-}
module ExQuant where
data Showable = forall a . Show a => Showable a
pattern Nasty{a} = Showable a
qux = a (Showable True)
foo = (Showable ()) { a = True }
| ezyang/ghc | testsuite/tests/patsyn/should_fail/records-exquant.hs | bsd-3-clause | 220 | 0 | 8 | 42 | 78 | 42 | 36 | 6 | 1 |
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may n... | traceguide/api-php | vendor/apache/thrift/lib/hs/src/Thrift/Types.hs | mit | 4,101 | 0 | 9 | 1,078 | 858 | 479 | 379 | 92 | 0 |
{-# LANGUAGE TypeFamilies #-}
module ShouldCompile where
class C1 a where
data S1 a :: *
-- instance of data families can be data or newtypes
instance C1 Char where
newtype S1 Char = S1Char ()
| urbanslug/ghc | testsuite/tests/indexed-types/should_compile/Simple7.hs | bsd-3-clause | 200 | 0 | 7 | 43 | 44 | 25 | 19 | 6 | 0 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ImpredicativeTypes #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StandaloneDeriving #-}
module Data.KDTree where
import qualified Data.Vector... | fhaust/kdtree | src/Data/KDTree.hs | mit | 10,682 | 0 | 17 | 4,074 | 3,723 | 1,906 | 1,817 | 161 | 9 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.