This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
const int infinity = 2147483647; | |
struct edge_t { | |
int v1; | |
int v2; | |
int cost; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RankNTypes, TypeInType, TypeApplications, OverloadedLabels, | |
ScopedTypeVariables, TypeOperators, GADTs, FlexibleInstances, FlexibleContexts, | |
TypeFamilies, UndecidableInstances #-} | |
import Data.Kind (Type) | |
import Data.Proxy (Proxy(..)) | |
import GHC.Generics | |
import GHC.TypeLits (Symbol, KnownSymbol, symbolVal) | |
import Control.Lens | |
import Data.Generics.Product.Fields (field') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE LambdaCase, BlockArguments, EmptyCase #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE TypeSynonymInstances, TypeOperators, FlexibleInstances, FlexibleContexts, UndecidableInstances #-} | |
{-# LANGUAGE TypeFamilies, GADTs, MultiParamTypeClasses, FunctionalDependencies #-} | |
{-# LANGUAGE DataKinds, PolyKinds, AllowAmbiguousTypes, TypeApplications, ScopedTypeVariables #-} | |
import GHC.Generics | |
import Unsafe.Coerce (unsafeCoerce) | |
import Data.Type.Equality |